home *** CD-ROM | disk | FTP | other *** search
- June 29, 1992
-
- ============================================================
-
- BADFILE.EXE a program designed to remove a leading "-" from
- files received through file echos.
-
- ============================================================
-
- Why Badfile? It is clearly documented that Maximus BBS treats a
- leading dash ("-") in a file name as a comment. It has recently come to
- my attention that this feature when combined with an oversight in some
- file tossers can be used as a "back door" into Maximus CBBS. This program
- is designed to prevent that from happening.
-
-
- You run this program after files are received, but before TICK processes
- your files.
-
- While a change to your batch file could do the trick, this program is passed
- your incoming directory (IN in your TIC.CFG), and checks all files for the
- leading "-" in the file name.
-
- When the program is run it attempts to create a badfiles directory under the
- directory you specify on the command line. This directory, specified on the
- command line, should be the same one as the IN directory in your TIC.CFG file.
- If it finds any files with a leading "-" it renames them to the badfiles
- directory (or in the current directory if the badfiles directory couldn't be
- created) replacing the leading "-" with an "A". If a file of that name
- already exists, it replaces that character with a "B", etc.
-
- When TIC is run, it will rename the original *.tic to *.bad so you can then
- examine the culprit and delete it if necessary.
-
- While this program solves the immediate problem of the leading "-" in a
- filename coming into a Max system, Scott is correct that TICK and any other
- file tosser should have no reason to allow ctrl codes in a file description.
-
- Just so you know, I will definitely make sure that this is addressed in the
- FileToss Project. The FileToss Project has been designed based on input from
- FDN heads and FileMovers. I am now advertising for programmers in the C_Echo.
- Tracking and directing the movement of the files through FIDO and tossing the
- files when they reach their destination(s) will be included in the
- functionality of this program.
-
- If I can steal time from FileToss, the PDN, my BBS and my family(!), I will
- see about adding an option to the BADFILE program which will strip all ctrl
- codes from file descriptions included in a tick file.
-
- Janis Kracht
- 1:272/38
- IC PDN
-
- ---------------
- Calling Badfile
- ---------------
- From my Batchfile:
-
- BADFILE C:\FD\INCOMING REM (note: no trailing backslash)
- TICK /OC >> tick.log
- Raid Announce
- TICK
-
-
-
-
- This will change drive\directory to c:\fd\incoming, look for any files
- which begin with a dash, create a BADFILES directory (if it does not already
- exist) if it finds any files with a leading dash, move these files into the
- BADFILES directory renaming them as described above. If it doesn't find any
- files with a leading dash, it exits.
-
- Notes:
- The Errorlevel will be set to the number of files found with a leading dash,
- or 255 in the case of an invalid arguement on the command line.
-